<template>
	<div>
		<h1>Foo</h1>
		<router-link to="/foo/profile">/foo/profile</router-link>
		|
		<router-link to="/foo/posts">/foo/posts</router-link>
		<h1>{{ count }}</h1>
    <button @click="increment">count++</button>
    <hr>
    <h2>{{ $store.state.count }}</h2>
    <button @click="$store.commit('increment')">store count++</button>
		<hr>
		<router-view></router-view>
	</div>
</template>

<script>
export default {
  // 状态 state
  data() {
    return {
      count: 1
    }
  },
  methods: {
    // 行为 actions
    increment () {
      this.count++
    }
  }
}
</script>

<style>
</style>
